<!---HHHXB 于  2013-9-27 下午9:52:48 编写--->
<?php
header ( "Content-Type: text/html;charset= UTF-8" );
require_once 'SqlTool.class.php';
//向user1表新增一条记录
$sql = "insert into user1(name,password,email,age)
		values('地地方方',md5('12e3'),'xiaoming@sohu.com',34)";
// 创建一个数据库create=建立,drop=删除
$sql = "create database hxb2";
// $res = sqlTool::execute_dml ( $sql );
// *********** 删,改,增,dml 操作 ****************
$sqlTool = new sqlTool ();
$res = $sqlTool->execute_dml ( $sql );
if ($res == 0) {
	echo "失败<br/>";
} else if ($res == 1) {
	echo "成功<br/>";
} else if ($res = 2) {
	echo "没有影响行数<br/>";
}
// *********** 查询dql操作 ****************
$sql = "select * from user1";
$res = $sqlTool->execute_dql ( $sql );
while ( $row = mysql_fetch_row ( $res ) ) {
	foreach ( $row as $key => $val ) {
		echo "--$val";
	}
	echo "<br/>";
}
mysql_free_result ( $res );
?>